<script type="text/javascript">
$(function(){
	$.formValidator.initConfig({
	    formID:"admin_newscategorylist_add_dialog_form",
	    onError:function(msg){
	        /*$.messager.alert('错误提示', msg, 'error');*/
	    },
	    onSuccess:adminnewscategorylistAddDialogFormSubmit,
	    submitAfterAjaxPrompt:'有数据正在异步验证，请稍等...',
	    inIframe:true
	});
})
function adminnewscategorylistAddDialogFormSubmit(){
	$.post('/admin/news/news_category_add', $("#admin_newscategorylist_add_dialog_form").serialize(), function(res){
		if(res.code == 0){
		    $.messager.alert('提示信息', res.msg, 'info');
			$('#admin_newscategorylist_add_dialog').dialog('close');
            adminnewscategorylistRefresh();
		}else{
			$.messager.alert('提示信息', res.msg, 'error');
		}
	}, 'json')
}
</script>
<form id="admin_newscategorylist_add_dialog_form">
{% raw xsrf_form_html() %}
<table cellspacing="6" width="100%">
	<tr>
		<td width="80">分类名称：</td>
		<td><input id="admin_newscategorylist_add_dialog_form_name" type="text" name="category_name" style="width:280px;height:22px" /></td>
		<td><div id="admin_newscategorylist_add_dialog_form_nameTip"></div></td>
	</tr>
</table>
</form>